home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / clue.lha / clue / examples / old / defsystem.l < prev    next >
Encoding:
Text File  |  1989-07-12  |  2.9 KB  |  91 lines

  1. ;;; -*- Mode:Lisp; Package:USER; Syntax:COMMON-LISP; Base:10; Lowercase:T -*-
  2.  
  3. ;;;
  4. ;;;             TEXAS INSTRUMENTS INCORPORATED
  5. ;;;                  P.O. BOX 2909
  6. ;;;                   AUSTIN, TEXAS 78769
  7. ;;;
  8. ;;; Copyright (C) 1988 Texas Instruments Incorporated.
  9. ;;;
  10. ;;; Permission is granted to any individual or institution to use, copy, modify,
  11. ;;; and distribute this software, provided that this complete copyright and
  12. ;;; permission notice is maintained, intact, in all copies and supporting
  13. ;;; documentation.
  14. ;;;
  15. ;;; Texas Instruments Incorporated provides this software "as is" without
  16. ;;; express or implied warranty.
  17. ;;;
  18.  
  19. (in-package 'user)
  20.  
  21. (unless (find-package 'clue-examples)
  22.   (make-package 'clue-examples
  23.         :use '(lisp xlib clos cluei)))
  24.  
  25. (defun compile-clue-examples (&optional (option :compile) directory)
  26.   ;; Load CLUE-examples, optionally compiling changed files.
  27.   ;; If OPTION is :RECOMPILE, recompile all files
  28.   ;; If OPTION is :LOAD, don't compile anything, just load.
  29.   ;; WARNING: CLX and CLUE MUST BE LOADED FIRST!!!
  30.   (declare (type (or null string pathname) directory)
  31.        (type (or null (member :load :compile :recompile)) option))
  32.   (unless directory
  33.     (setq directory (or *CLUE-EXAMPLES-directory* *default-pathname-defaults*)))
  34.   (setq *CLUE-EXAMPLES-directory* directory)    ; Set defaults for the next time
  35.   (unless (find-package 'clue)
  36.     (error "CLUE must be loaded before building EXAMPLES."))
  37.  
  38.   (flet ((module (file &optional opt dir)
  39.        (compile-load (merge-pathnames file (or dir directory)) (or opt option))))
  40.  
  41.     (module "button")        ;; label and button contacts
  42.     (module "menu")        ;; menu contacts
  43.     (module "valuators")    ;; sliders
  44.     (module "alt-menu")        ;; Menus whose items aren't windows
  45.     (module "rmenu")        ;; Menu whose item list is a resource
  46.     (module "scroll")     ;; wraps scroll bars onto a window
  47.     ))
  48.  
  49. (defun load-clue-examples (&rest options)
  50.   ;; Load CLUE
  51.   ;; WARNING: CLX and CLUE MUST BE LOADED FIRST!!!
  52.   (apply #'compile-clue-examples :load options))
  53.  
  54. ;;;-----------------------------------------------------------------------------
  55. ;;; DEFSYSTEM to make lispm users more comfortable
  56.  
  57. #+explorer
  58. (defsystem clue-examples
  59.   (:pathname-default "sys:clue.examples.old;")
  60.   #+pcl (:default-output-directory "sys:clue.examples.old;")
  61.  
  62.   (:module button "button")
  63.   (:module menu "menu")
  64.   (:module valuators "valuators")
  65.   (:module virtual "alt-menu")
  66.   (:module resource "rmenu")
  67.   (:module scroll "scroll")
  68.  
  69.   (:compile-load button)
  70.   (:compile-load menu       (:fasload button))
  71.   (:compile-load valuators (:fasload menu))
  72.   (:compile-load virtual   (:fasload valuators))
  73.   (:compile-load resource  (:fasload virtual))
  74.   (:compile-load scroll    (:fasload resource))
  75.   )
  76.  
  77. #+symbolics
  78. (defsystem clue-examples
  79.   (:default-pathname "clue:examples;"
  80.    :bug-reports ("clue-bugs@dsg.csc.ti.com" "Report problems with CLUE.")
  81.    ) 
  82.   (:serial "button" "menu" "valuators" "alt-menu" "rmenu" "scroll")
  83.   )
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.